package com.tekj.cxqcb.view.Module.activity.ServiceOrder.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.tekj.cxqcb.R;
import com.tekj.cxqcb.operation.resultBean.ShopServiceOrder;

import java.util.List;

import common.tool.Tools;

public class ServiceGoodsAdapter extends BaseQuickAdapter<ShopServiceOrder.DataBean.ShopServiceBean, BaseViewHolder> {
    public ServiceGoodsAdapter(@Nullable List<ShopServiceOrder.DataBean.ShopServiceBean> data) {
        super(R.layout.item_service_goods, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ShopServiceOrder.DataBean.ShopServiceBean item) {
        Tools.picassoNetwork(item.getServiceImg(), (ImageView) helper.getView(R.id.img_photo));

        helper.setText(R.id.tv_service_name, item.getServiceName());

        helper.setText(R.id.tv_price, "￥" + item.getPrice());

        helper.setText(R.id.tv_service_type, item.getServiceExplain());

        helper.setText(R.id.tv_num, "×" + item.getNum());

    }
}
